﻿#pragma once

#include <qwidget.h>
#include <qtextedit.h>
#include <qlistwidget.h>
#include <qlineedit.h>
#include <qpushbutton.h>
#include <qboxlayout.h> //#include <QVBoxLayout> <QHBoxLayout>
#include "Online.h"
#include "protocol.h"
#include <QDialog>


class Friend :
	public QWidget
{
	Q_OBJECT
public:
	explicit Friend(QWidget* parent = nullptr);
	void showAllOnlineUsr(PDU* pdu);

signals:

public slots:
	void showOnline();
	void searchUsr();

private:
	//显示信息
	QTextEdit* m_pShowMsgTE;
	//显示好友列表
	QListWidget* m_pFriendListWidget;
	//显示信息输入框
	QLineEdit* m_pInputMsgLE;

	//删除好友
	QPushButton* m_pDelFriendPB;
	//刷新好友列表
	QPushButton* m_pFlushFriendPB;
	//查看在线的用户
	QPushButton* m_pShowOnlineUsrPB;
	//查找用户
	QPushButton* m_pSearchUsrPB;
	//发送按钮
	QPushButton* m_pMsgSendPB;
	//私聊按钮
	QPushButton* m_pPrivateChatPB;

	//弹出式显示在线用户
	Online* m_pOnline;
};